﻿/**********************************************************************
*  Copyright (c) 2007 - Victor Jacobs - victor.jacobs@gmail.com
*
*  Permission is hereby granted, free of charge, to any person
*  obtaining a copy of this software and associated documentation
*  files (the "Software"), to deal in the Software without
*  restriction, including without limitation the rights to use,
*  copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the
*  Software is furnished to do so, subject to the following
*  conditions:
*
*  The above copyright notice and this permission notice shall be
*  included in all copies or substantial portions of the Software.
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
*  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
*  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
*  OTHER DEALINGS IN THE SOFTWARE.
**********************************************************************/

using System;
using Tao.Ode;
using System.Drawing;

namespace Vj.ODEObjectLibrary
{
    public abstract class ODEObject
    {
        protected IntPtr[] bodyArray = null;
        protected IntPtr[] jointArray = null;
        protected IntPtr[] geomArray = null;

        protected Color color;
        protected Ode.dVector3 position;
        protected Ode.dVector3 velocity;
        protected Ode.dVector3 rotation;

        public IntPtr[] BodyArray
        {
            get { return bodyArray; }
            set { bodyArray = value; }
        }

        public Color Color 
        { 
            get { return color ;}
            set { color = value;} 
        }
                
        public Ode.dVector3 Position
        {
            get { return position; }
            set { position = value; }
        }

        public Ode.dVector3 Velocity
        {
            get { return velocity; }
            set { velocity = value; }
        }

        public Ode.dVector3 Rotation
        {
            get { return rotation; }
            set { rotation = value; }
        }

        protected float mass;

        public float Mass
        {
            get { return mass; }
            set { mass = value; }        
        }

        //public Ode.dVector3 Dimension { get; set; }
        //public float Size { get; set;}

        public ODEObject()
        {
            //bodyArray = new IntPtr[1];
            //geomArray = new IntPtr[1];
            //jointArray = new IntPtr[0];
        }



        public abstract void Render();









    }
}
